Solving Rubik's Cube Using SAT Solvers

نویسنده

  • Jingchao Chen
چکیده

Rubik’s Cube is an easily-understood puzzle, which is originally called the “magic cube”. It is a well-known planning problem, which has been studied for a long time. Yet many simple properties remain unknown. This paper studies whether modern SAT solvers are applicable to this puzzle. To our best knowledge, we are the first to translate Rubik’s Cube to a SAT problem. To reduce the number of variables and clauses needed for the encoding, we replace a naive approach of 6 Boolean variables to represent each color on each facelet with a new approach of 3 or 2 Boolean variables. In order to be able to solve quickly Rubik’s Cube, we replace the direct encoding of 18 turns with the layer encoding of 18-subtype turns based on 6-type turns. To speed up the solving further, we encode some properties of two-phase algorithm as an additional constraint, and restrict some move sequences by adding some constraint clauses. Using only efficient encoding cannot solve this puzzle. For this reason, we improve the existing SAT solvers, and develop a new SAT solver based on PrecoSAT, though it is suited only for Rubik’s Cube. The new SAT solver replaces the lookahead solving strategy with an ALO (at-least-one) solving strategy, and decomposes the original problem into sub-problems. Each sub-problem is solved by PrecoSAT. The empirical results demonstrate both our SAT translation and new solving technique are efficient. Without the efficient SAT encoding and the new solving technique, Rubik’s Cube will not be able to be solved still by any SAT solver. Using the improved SAT solver, we can find always a solution of length 20 in a reasonable time. Although our solver is slower than Kociemba’s algorithm using lookup tables, but does not require a

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Cube and Conquer: Guiding CDCL SAT Solvers by Lookaheads

Satisfiability (SAT) is considered as one of the most important core technologies in formal verification and related areas. Even though there is steady progress in improving practical SAT solving, there are limits on scalability of SAT solvers. We address this issue and present a new approach, called cube-and-conquer, targeted at reducing solving time on hard instances. This two-phase approach ...

متن کامل

A Program That Learns to Solve Rubik's Cube

This paper dcscribcs a program which learns efficient strategies for solving problems such as Rubik’s cube and the eight puzzle. It uses a new gcncral problem solving method based on macro-operators. The strategies learned by the program are equal to or superior to strategies used by humans on these problems, in terms of number of moves rcquircd for solution.

متن کامل

Solving and Verifying the Boolean Pythagorean Triples Problem via Cube-and-Conquer

The boolean Pythagorean Triples problem has been a longstanding open problem in Ramsey Theory: Can the set N = {1, 2, . . . } of natural numbers be divided into two parts, such that no part contains a triple (a, b, c) with a + b = c ? A prize for the solution was offered by Ronald Graham over two decades ago. We solve this problem, proving in fact the impossibility, by using the Cube-and-Conque...

متن کامل

Compositional Propositional Proofs

Many hard-combinatorial problems have only be solved by SAT solvers in a massively parallel setting. This reduces the trust one has in the final result as errors might occur during parallel SAT solving or during partitioning of the original problem. We present a new framework to produce clausal proofs for cube-and-conquer, arguably the most effective parallel SAT solving paradigm for hard-combi...

متن کامل

The Diameter of the Rubik's Cube Group Is Twenty

We give an expository account of our computational proof that every position of Rubik’s Cube can be solved in 20 moves or less, where a move is defined as any twist of any face. The roughly 4.3 × 1019 positions are partitioned into about two billion cosets of a specially chosen subgroup, and the count of cosets required to be treated is reduced by considering symmetry. The reduced space is sear...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1105.1436  شماره 

صفحات  -

تاریخ انتشار 2011